#include "Model.h"

namespace drawing {

	Model::Model() :
		m_textureFilename( "" )
	{
		m_mesh = new Mesh();
	}

	Model::Model( Mesh* mesh, const std::string& textureFilename, Material material ) :
		m_mesh( mesh ),
		m_textureFilename( textureFilename ),
		m_material( material )
	{}

	Model::Model( const Model& other ) :
		m_mesh( other.m_mesh ),
		m_textureFilename( other.m_textureFilename ),
		m_material( other.m_material )
	{}

	Model& Model::operator=( const Model& rhs )
	{
		if( this == &rhs ) return *this; // handle self assignment

		m_mesh = rhs.GetMesh();
		m_textureFilename = rhs.GetTextureFilename();
		m_material = rhs.GetMaterial();

		return *this;
	}
}
